stylecontext: Query style properties with correct state
authorBenjamin Otte <otte@redhat.com>
Tue, 22 Jul 2014 00:53:06 +0000 (02:53 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 22 Jul 2014 01:06:04 +0000 (03:06 +0200)
Now that widget paths are allowed to have a state, use that state when
querying style properties. This uses a fast path in gtkcssprovider.c and
that is great.

gtk/gtkstylecontext.c

index 8146819ba0cd690897d92cf50d4f602c296beb1b..f7f317932171eb9cc1f3d9af4aa88c70618d0e76 100644 (file)
@@ -2111,7 +2111,8 @@ _gtk_style_context_peek_style_property (GtkStyleContext *context,
 
       if (gtk_style_provider_get_style_property (GTK_STYLE_PROVIDER (priv->cascade),
                                                  widget_path,
-                                                 0, pspec, &pcache->value))
+                                                 gtk_widget_path_iter_get_state (widget_path, -1),
+                                                 pspec, &pcache->value))
         {
           G_GNUC_BEGIN_IGNORE_DEPRECATIONS;